package cate.game.trace.sub;

import cate.game.GameBody;
import cate.game.framework.ModuleMan;

import java.util.List;

public abstract class SubTrace extends ModuleMan {

    @Override
    public void initIndependent(GameBody game) throws Exception {
        super.initIndependent(game);
    }

    @Override
    public void initDependent() throws Exception {
    }

    public int write(Object logEntity) {
        return game.facilities.getSqlite().insert(logEntity);
    }

    public int write(List<?> logEntityList) {
        return game.facilities.getSqlite().insert(logEntityList);
    }

    public int upsert(Object logEntity) {
        return game.facilities.getSqlite().upsert(logEntity);
    }

    public int upsert(List<?> logEntityList) {
        return game.facilities.getSqlite().upsert(logEntityList);
    }
}
